home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_olv_head2.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
9KB
|
398 lines
# Level 9: Valley Of The Old Ones.
#
# olv_head2.cog slide rockhead 2.
#
# [DS & revised by HB]
#
# (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
#
# ==============================================================================
Symbols
message startup
message entered
message activated
message exited
message touched
message pulse
message crossed
keyframe smashed=in_die_fall.key local
keyframe falldown=olv_rock_headb.key local
sound Death=tem_temspikes_up_kill_c.wav local
sound trap=inxj041a.wav local # I sense a trap...
sound nope=inxj058.wav local # That wont work.
sound release=gen_stonebutt_push_c.wav local
sound slidsnd=olv_head2_slide_c.wav local
sound hitsnd=olv_rockhead_hitearth_c.wav local
sound hitstone=pru_boulder_crash_c.wav local
thing player local
thing head2
thing push1
thing head2_cam_1 nolink
thing head2_poscam nolink
thing head2_ct_1 nolink
thing skeleton nolink
thing head2b nolink
surface tube0
surface drop0 mask=0x480
surface drop1
surface playerstop0 nolink
surface playerstop1 nolink
sector safe_sec
# ........debris to block pushblock........
surface blockface
surface blockface_back
thing debrispos
template debris0=stnshrpa local
template debris1=stnshrpb local
template debris2=stnshrpc local
cog noworktalkcog
cog hints # send message when complete
vector v_campos local
float slidespeed1=12.0
float slidespeed2=20.0
int curcam local
int dropredy=0 local
int rel local
int moven local
int slid=1 local
int talking=0 local
int vibe=0 local
int shake=0 local
int inway=0 local
int safe=0 local
flex victim local
vector posoffset local
vector angoffset local
end
# ==============================================================================
code
# ..............................................................................
startup:
player=GetLocalPlayerThing();
SetAdjoinFlags(blockface, 2); # passable
SetThingLight(push1, '0.5 0.5 0.4', 0.01, 0.01);
SetThingLight(skeleton, '0.3 0.2 0.3', 0.01, 0.01);
SetThingFlags(head2b, 0x80000);
return;
# ..............................................................................
entered:
if (dropredy > 1)
{
return;
}
if (GetSenderRef() == drop1)
{
inway=1;
return;
}
if ((getsenderref() == tube0) && (dropredy == 0))
{
SendMessageEx(hints, user1, 1, 0, 0, 0); #param0=1; standing on pad.
rel = PlaySoundThing(release, head2, 1, 20, 25, 0);
waitforsound(rel);
PlayVoice(player, trap, 1.0, 0);
return;
}
if ((GetSenderRef() == safe_sec) && (GetSourceRef() == player))
{
safe=1;
return;
}
return;
# ..............................................................................
exited:
if (dropredy > 1)
{
return;
}
if (GetSenderRef() == drop1)
{
inway=0;
return;
}
if ((GetSenderRef() == safe_sec) && (GetSourceRef() == player))
{
safe=0;
return;
}
if (getsenderref() == tube0)
{
if(dropredy == 1) return;
dropredy=1;
slid=0;
SetAdjoinFlags(playerstop0, 0x10);
SetAdjoinFlags(playerstop1, 0x10);
rel = PlaySoundThing(release, head2, 1, 20, 25, 0);
waitforsound(rel);
moven = PlaySoundThing(slidsnd, head2, 1, 20, 25, 1);
MoveToFrame(head2, 1, slidespeed1);
sleep(3.0);
shake = 1;
SetPulse(0.1);
PlaySoundThing(hitstone, head2, 1, 20, 25, 0);
SetCollideType(push1, 0);
MoveToFrame(head2, 2, slidespeed1);
MoveToFrame(head2, 3, slidespeed2);
WaitForStop(head2);
PlaySoundThing(hitstone, head2, 1, 20, 25, 0);
SetCollideType(push1, 3);
MoveToFrame(head2, 4, slidespeed1);
WaitforStop(head2);
StopSound(moven, 0.01);
PlaySoundThing(hitstone, head2, 1, 20, 25, 0);
SetPulse(0.0);
ClearAdjoinFlags(blockface, 2); # No move
CreateThing(debris0, debrispos);
slid=1;
return;
}
if ((getsenderref() == drop0) && (getsourceref() == head2) && (dropredy == 1))
{
SetAdjoinFlags(blockface, 2); # passable
if (GetMoveStatus(player) == 8) return; # Pulling.
if ((GetMoveStatus(player) == 7) && (inway == 1)) return;
curcam = GetCurrentCamera();
SetActorFlags(player, 0x200000);
StartCutscene(1);
# Watch him push for a beat...
Sleep(4.0);
StopThing(player);
PlayMode(player, 1, 0);
dropredy = 2;
slid=0;
sleep(0.01);
moven = PlaySoundThing(slidsnd, head2, 1, 20, 25, 1);
MoveToFrame(head2, 5, 1);
MoveToFrame(head2, 6, 5);
Sleep(1.5);
StopSound(moven, 0.01);
# Cut to shot of rock emerging from cliff face...
SetCameraLookInterp(2, 0);
SetCameraPosInterp(2, 0);
SetCameraFocus(2, head2_cam_1);
SetCameraSecondaryFocus(2, head2_ct_1);
SetCurrentCamera(2);
SetCAmeraFOV(80, 0, 0.0);
Sleep(0.01);
SetCameraFOV(60, 1, 1.8);
WaitForStop(head2);
DestroyThing(head2);
ClearThingFlags(head2b, 0x80000);
PlayKey(head2b, falldown, 10, 0x12, 0);
sleep(0.8);
PlaySoundThing(hitsnd, head2, 1, 20, 25, 0);
shake = 2;
SetPulse(0.1);
Sleep(1.0);
SetPulse(0.0);
slid=1;
Sleep(1.0);
v_campos = GetThingPOS(head2_poscam);
SetCameraPosition(1, v_campos); # prep to swing back to follow-cam
Sleep(0.01);
ResetCameraFOV(0, 0.0);
SetCurrentCamera(curcam);
ResetCameraFOV(0, 0.0);
EndCutscene();
ClearActorFlags(player, 0x200000);
SendMessageEx(hints, user1, 2, 0, 0, 0); #param0=2; Rock head valley.
}
return;
# ..............................................................................
touched:
if (slid == 1)
{
return;
}
if (safe == 1) # In safe sector.
{
return;
}
if ((GetSenderRef() == head2) && (GetSourceRef() == player))
{
ClearActorFlags(player, 0x8);
DamageThing(player, 1000.0, 0x1, victim);
SetCollideType(head2, 0);
PlaySoundLocal(Death, 1.0, 0.0, 0x0, 0);
PlayKey(player, smashed, 10, 0x14, 0);
}
return;
# ..............................................................................
activated:
if (getsenderref() == blockface)
{
if (talking == 1)
{
return;
}
talking = 1;
MakeMeStop();
DeselectWeaponWait(player);
StartCutscene(0);
PlayMode(player, 60, 0);
SendMessageEx(noworktalkcog, user0, player, 0, 0, 0);
global15 = 0;
while (global15 == 0)
{
Sleep(0.01); # wait for voice to finish
}
talking = 0;
ClearActorFlags(player, 0x200000);
EndCutscene();
}
return;
# ..............................................................................
pulse:
vibe = RandBetween(1, 4);
if (vibe == 1)
{
if (shake == 1)
{
posOffset = '-0.005 0.00 -0.001'; #1 was .005x
angOffset = '0.00 -0.001 0.001';
}
if (shake == 2)
{
posOffset = '0.01 -0.01 0.005'; #2
angOffset = '0.005 0.00 -0.005';
}
if (shake == 3)
{
posOffset = '0.01 0.02 -0.02'; #3
angOffset = '-0.01 0.01 -0.01';
}
}
if (vibe == 2)
{
if (shake == 1)
{
posOffset = '0.005 -0.002 0.001'; #2 was .005x
angOffset = '0.001 0.00 -0.001';
}
if (shake == 2)
{
posOffset = '0.005 0.01 -0.01'; #3
angOffset = '-0.005 0.005 -0.00';
}
if (shake == 3)
{
posOffset = '-0.02 0.00 0.02'; #4 was .01x
angOffset = '0.00 0.00 0.01';
}
}
if (vibe == 3)
{
if (shake == 1)
{
posOffset = '0.002 0.002 -0.002'; #3 was .002x
angOffset = '-0.001 0.002 -0.002';
}
if (shake == 2)
{
posOffset = '-0.015 0.00 0.01'; #4 was .01x
angOffset = '0.00 0.00 0.01';
}
if (shake == 3)
{
posOffset = '-0.025 0.00 -0.01'; #1 was .02x
angOffset = '0.00 -0.01 0.01';
}
}
if (vibe == 4)
{
if (shake == 1)
{
posOffset = '-0.001 0.00 0.002'; #4
angOffset = '0.00 0.00 0.001';
}
if (shake == 2)
{
posOffset = '-0.01 0.00 -0.005'; #1
angOffset = '0.00 -0.005 0.005';
}
if (shake == 3)
{
posOffset = '0.02 -0.02 0.01'; #2
angOffset = '0.01 0.00 -0.01';
}
}
vibe = RandBetween(1, 3);
if (vibe == 1)
{
SetPulse(0.05);
}
if (vibe == 2)
{
SetPulse(0.1);
}
if (vibe == 3)
{
SetPulse(0.15);
}
SetPOVShake(posOffSet, angOffSet, 200.0, 200.0);
return;
crossed:
if (getsenderref() == blockface_back)
{
SetThingLight(push1, '0.1 0.1 0.0', 0.01, 2.0);
}
return;
end